package com.heer.gymnasium.module.reservation.beans;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by zy on 2018/2/28.
 */

public class ReservationBookItemResponseBean {

    private String show;
    private String place_id;
    private String start_time;
    private String end_time;
    private String type;
    private String status;
    private String category_id;

    public String getShow() {
        return show;
    }

    public void setShow(String show) {
        this.show = show;
    }

    public String getPlace_id() {
        return place_id;
    }

    public void setPlace_id(String place_id) {
        this.place_id = place_id;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setStart_time(String start_time) {
        this.start_time = start_time;
    }

    public String getEnd_time() {
        return end_time;
    }

    public void setEnd_time(String end_time) {
        this.end_time = end_time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCategory_id() {
        return category_id;
    }

    public void setCategory_id(String category_id) {
        this.category_id = category_id;
    }

    public static List<ReservationBookItemResponseBean> dataChange(List<ReservationGridBean> list){
        List<ReservationBookItemResponseBean> newList = new ArrayList<>();
        for(ReservationGridBean item:list){
            ReservationBookItemResponseBean bean = new ReservationBookItemResponseBean();
            bean.setPlace_id(item.getId());
            bean.setStart_time(item.getStartTime());
            bean.setEnd_time(item.getEndTime());
            bean.setCategory_id(item.getCategoryId());
            newList.add(bean);
        }
        return newList;
    }
}
